home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / rcs5ap1b.lzh / RCSINTRO.1LP < prev    next >
Encoding:
Text File  |  1991-01-30  |  10.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4. RCSINTRO(1)            Programmer's Manual            RCSINTRO(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      rcsintro - introduction to RCS commands
  10.  
  11. DESCRIPTION
  12.      The Revision Control System (RCS) manages multiple revisions
  13.      of files.  RCS automates the storing, retrieval, logging,
  14.      identification, and merging of revisions.  RCS is useful for
  15.      text that is revised frequently, for example programs, docu-
  16.      mentation, graphics, papers, and form letters.
  17.  
  18.      The basic user interface is extremely simple.  The novice
  19.      only needs to learn two commands: ci(1) and co(1).  ci,
  20.      short for "check in", deposits the contents of a file into
  21.      an archival file called an RCS file.  An RCS file contains
  22.      all revisions of a particular file.  co, short for "check
  23.      out", retrieves revisions from an RCS file.
  24.  
  25.      Functions of RCS
  26.  
  27.      o✓+    Store and retrieve multiple revisions of text.  RCS
  28.           saves all old revisions in a space efficient way.
  29.           Changes no longer destroy the original, because the
  30.           previous revisions remain accessible.  Revisions can be
  31.           retrieved according to ranges of revision numbers, sym-
  32.           bolic names, dates, authors, and states.
  33.  
  34.      o✓+    Maintain a complete history of changes.  RCS logs all
  35.           changes automatically.  Besides the text of each revi-
  36.           sion, RCS stores the author, the date and time of
  37.           check-in, and a log message summarizing the change.
  38.           The logging makes it easy to find out what happened to
  39.           a module, without having to compare source listings or
  40.           having to track down colleagues.
  41.  
  42.      o✓+    Resolve access conflicts.  When two or more programmers
  43.           wish to modify the same revision, RCS alerts the pro-
  44.           grammers and prevents one modification from corrupting
  45.           the other.
  46.  
  47.      o✓+    Maintain a tree of revisions.  RCS can maintain
  48.           separate lines of development for each module.  It
  49.           stores a tree structure that represents the ancestral
  50.           relationships among revisions.
  51.  
  52.      o✓+    Merge revisions and resolve conflicts.  Two separate
  53.           lines of development of a module can be coalesced by
  54.           merging.  If the revisions to be merged affect the same
  55.           sections of code, RCS alerts the user about the over-
  56.           lapping changes.
  57.  
  58.      o✓+    Control releases and configurations.  Revisions can be
  59.           assigned symbolic names and marked as released, stable,
  60.  
  61.  
  62.  
  63. Printed 1/29/91            1990/08/22                           1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RCSINTRO(1)            Programmer's Manual            RCSINTRO(1)
  71.  
  72.  
  73.  
  74.           experimental, etc.  With these facilities, configura-
  75.           tions of modules can be described simply and directly.
  76.  
  77.      o✓+    Automatically identify each revision with name, revi-
  78.           sion number, creation time, author, etc.  The identifi-
  79.           cation is like a stamp that can be embedded at an
  80.           appropriate place in the text of a revision.  The iden-
  81.           tification makes it simple to determine which revisions
  82.           of which modules make up a given configuration.
  83.  
  84.      o✓+    Minimize secondary storage.  RCS needs little extra
  85.           space for the revisions (only the differences).  If
  86.           intermediate revisions are deleted, the corresponding
  87.           deltas are compressed accordingly.
  88.  
  89.      Getting Started with RCS
  90.      Suppose you have a file f.c that you wish to put under con-
  91.      trol of RCS.  Invoke the check-in command
  92.  
  93.           ci  f.c
  94.  
  95.      This command creates the RCS file f.c,v, stores f.c into it
  96.      as revision 1.1, and deletes f.c.  It also asks you for a
  97.      description.  The description should be a synopsis of the
  98.      contents of the file.  All later check-in commands will ask
  99.      you for a log entry, which should summarize the changes that
  100.      you made.
  101.  
  102.      Files ending in ,v are called RCS files ("v" stands for
  103.      "versions"); the others are called working files.  To get
  104.      back the working file f.c in the previous example, use the
  105.      check-out command
  106.  
  107.           co  f.c
  108.  
  109.      This command extracts the latest revision from f.c,v and
  110.      writes it into f.c.  If you want to edit f.c, you must lock
  111.      it as you check it out with the command
  112.  
  113.           co  -l  f.c
  114.  
  115.      You can now edit f.c.
  116.  
  117.      Suppose after some editing you want to know what changes
  118.      that you have made.  The command
  119.  
  120.           rcsdiff  f.c
  121.  
  122.      tells you the difference between the most recently checked-
  123.      in version and the working file.  You can check the file
  124.      back in by invoking
  125.  
  126.  
  127.  
  128.  
  129. Printed 1/29/91            1990/08/22                           2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RCSINTRO(1)            Programmer's Manual            RCSINTRO(1)
  137.  
  138.  
  139.  
  140.           ci  f.c
  141.  
  142.      This increments the revision number properly.
  143.  
  144.      If ci complains with the message
  145.  
  146.           ci error: no lock set by _✓y_✓o_✓u_✓r _✓n_✓a_✓m_✓e
  147.  
  148.      then you have tried to check in a file even though you did
  149.      not lock it when you checked it out.  Of course, it is too
  150.      late now to do the check-out with locking, because another
  151.      check-out would overwrite your modifications.  Instead,
  152.      invoke
  153.  
  154.           rcs  -l  f.c
  155.  
  156.      This command will lock the latest revision for you, unless
  157.      somebody else got ahead of you already.  In this case,
  158.      you'll have to negotiate with that person.
  159.  
  160.      Locking assures that you, and only you, can check in the
  161.      next update, and avoids nasty problems if several people
  162.      work on the same file.  Even if a revision is locked, it can
  163.      still be checked out for reading, compiling, etc.  All that
  164.      locking prevents is a _✓c_✓h_✓e_✓c_✓k-_✓i_✓n by anybody but the locker.
  165.  
  166.      If your RCS file is private, i.e., if you are the only per-
  167.      son who is going to deposit revisions into it, strict lock-
  168.      ing is not needed and you can turn it off.  If strict lock-
  169.      ing is turned off, the owner of the RCS file need not have a
  170.      lock for check-in; all others still do.  Turning strict
  171.      locking off and on is done with the commands
  172.  
  173.           rcs  -U  f.c     and     rcs  -L  f.c
  174.  
  175.      If you don't want to clutter your working directory with RCS
  176.      files, create a subdirectory called RCS in your working
  177.      directory, and move all your RCS files there.  RCS commands
  178.      will look first into that directory to find needed files.
  179.      All the commands discussed above will still work, without
  180.      any modification.  (Actually, pairs of RCS and working files
  181.      can be specified in three ways: (a) both are given, (b) only
  182.      the working file is given, (c) only the RCS file is given.
  183.      Both RCS and working files may have arbitrary path prefixes;
  184.      RCS commands pair them up intelligently.)
  185.  
  186.      To avoid the deletion of the working file during check-in
  187.      (in case you want to continue editing or compiling), invoke
  188.  
  189.           ci  -l  f.c     or     ci  -u  f.c
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Printed 1/29/91            1990/08/22                           3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RCSINTRO(1)            Programmer's Manual            RCSINTRO(1)
  203.  
  204.  
  205.  
  206.      These commands check in f.c as usual, but perform an impli-
  207.      cit check-out.  The first form also locks the checked in
  208.      revision, the second one doesn't.  Thus, these options save
  209.      you one check-out operation.  The first form is useful if
  210.      you want to continue editing, the second one if you just
  211.      want to read the file.  Both update the identification mark-
  212.      ers in your working file (see below).
  213.  
  214.      You can give ci the number you want assigned to a checked in
  215.      revision.  Assume all your revisions were numbered 1.1, 1.2,
  216.      1.3, etc., and you would like to start release 2.  The com-
  217.      mand
  218.  
  219.           ci  -r2  f.c     or     ci  -r2.1  f.c
  220.  
  221.      assigns the number 2.1 to the new revision.  From then on,
  222.      ci will number the subsequent revisions with 2.2, 2.3, etc.
  223.      The corresponding co commands
  224.  
  225.           co  -r2  f.c     and     co  -r2.1  f.c
  226.  
  227.      retrieve the latest revision numbered 2._✓x and the revision
  228.      2.1, respectively.  co without a revision number selects the
  229.      latest revision on the _✓t_✓r_✓u_✓n_✓k, i.e. the highest revision with
  230.      a number consisting of two fields.  Numbers with more than
  231.      two fields are needed for branches.  For example, to start a
  232.      branch at revision 1.3, invoke
  233.  
  234.           ci  -r1.3.1  f.c
  235.  
  236.      This command starts a branch numbered 1 at revision 1.3, and
  237.      assigns the number 1.3.1.1 to the new revision.  For more
  238.      information about branches, see rcsfile(5).
  239.  
  240.      Automatic Identification
  241.      RCS can put special strings for identification into your
  242.      source and object code.  To obtain such identification,
  243.      place the marker
  244.  
  245.           $Id$
  246.  
  247.      into your text, for instance inside a comment.  RCS will
  248.      replace this marker with a string of the form
  249.  
  250.           $Id:  _✓f_✓i_✓l_✓e_✓n_✓a_✓m_✓e  _✓r_✓e_✓v_✓i_✓s_✓i_✓o_✓n  _✓d_✓a_✓t_✓e  _✓t_✓i_✓m_✓e  _✓a_✓u_✓t_✓h_✓o_✓r  _✓s_✓t_✓a_✓t_✓e  $
  251.  
  252.      With such a marker on the first page of each module, you can
  253.      always see with which revision you are working.  RCS keeps
  254.      the markers up to date automatically.  To propagate the
  255.      markers into your object code, simply put them into literal
  256.      character strings.  In C, this is done as follows:
  257.  
  258.  
  259.  
  260.  
  261. Printed 1/29/91            1990/08/22                           4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RCSINTRO(1)            Programmer's Manual            RCSINTRO(1)
  269.  
  270.  
  271.  
  272.           static char rcsid[] = "$Id$";
  273.  
  274.      The command ident extracts such markers from any file, even
  275.      object code and dumps.  Thus, ident lets you find out which
  276.      revisions of which modules were used in a given program.
  277.  
  278.      You may also find it useful to put the marker $Log$ into
  279.      your text, inside a comment.  This marker accumulates the
  280.      log messages that are requested during check-in.  Thus, you
  281.      can maintain the complete history of your file directly
  282.      inside it.  There are several additional identification
  283.      markers; see co(1) for details.
  284.  
  285. IDENTIFICATION
  286.      Author: Walter F. Tichy.
  287.      Revision Number: 5.0; Release Date: 1990/08/22.
  288.      Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  289.      Copyright c 1990 by Paul Eggert.
  290.  
  291. SEE ALSO
  292.      ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1),
  293.      rcsmerge(1), rlog(1)
  294.      Walter F. Tichy, RCS--A System for Version Control,
  295.      _✓S_✓o_✓f_✓t_✓w_✓a_✓r_✓e--_✓P_✓r_✓a_✓c_✓t_✓i_✓c_✓e & _✓E_✓x_✓p_✓e_✓r_✓i_✓e_✓n_✓c_✓e 15, 7 (July 1985), 637-654.
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. Printed 1/29/91            1990/08/22                           5
  328.  
  329.  
  330.  
  331.